home *** CD-ROM | disk | FTP | other *** search
/ Champak 106 / Vol 106.iso / games / rain_for.swf / scripts / __Packages / smashing / Renderable.as < prev    next >
Encoding:
Text File  |  2010-04-12  |  946 b   |  41 lines

  1. class smashing.Renderable extends MovieClip
  2. {
  3.    var mpX = 16777215;
  4.    var mpY = 16777215;
  5.    var mpZ = 16777215;
  6.    var mpScale = 16777215;
  7.    var mScale = 100;
  8.    var changed = true;
  9.    var scaleMod = 1;
  10.    function Renderable()
  11.    {
  12.       super();
  13.    }
  14.    function set scale(n)
  15.    {
  16.       this._xscale = n;
  17.       this._yscale = n;
  18.    }
  19.    function render()
  20.    {
  21.       var _loc2_ = smashing.Viewport.getPos(this);
  22.       if(_loc2_ != undefined)
  23.       {
  24.          var _loc3_ = _loc2_.scale;
  25.          if(_loc2_.x != undefined)
  26.          {
  27.             this._x = _loc2_.x * _loc3_ + smashing.Viewport.centerX;
  28.          }
  29.          if(_loc2_.y != undefined)
  30.          {
  31.             this._y = _loc2_.y * _loc3_ + smashing.Viewport.centerY;
  32.          }
  33.          if(_loc3_ != this.mpScale)
  34.          {
  35.             this.mpScale = _loc3_;
  36.             this.scale = _loc3_ / this.scaleMod * 100;
  37.          }
  38.       }
  39.    }
  40. }
  41.